package com.shirojwt.controller;

import com.shirojwt.com.lang.JwtResultMap;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author chenguo
 * @date 2021/10/12 3:54 下午
 */

@RestController
@RequestMapping("/admin")
public class AdminController {
    @Resource
    private JwtResultMap resultMap;

    @RequiresRoles("admin")
    @GetMapping("/enter")
    public JwtResultMap enter(){
        return resultMap.success().code(200).message("Admin Enter");
    }
}
